package com.ltxtiyu.video.common;

/**
 * key
 * 防止复制错误
 */
public class ConfigConstant {

    /* 音乐id用hashids加密配置 */
    public static final String HASH_IDS_SECRET_KEY = "ltx";
    public static final Integer HASH_IDS_VALUE_LENGTH = 18;

    /* 数据库的一些图片config的key */
    public static final String OSS_ENDPOINT = "OSS_ENDPOINT";
    public static final String ACCESS_ID = "ACCESS_ID";
    public static final String ACCESS_KEY = "ACCESS_KEY";
    public static final String BUCKET_ID = "BUCKET_ID";
    public static final String BUCKET_ID_MUSIC = "BUCKET_ID_MUSIC"; // 音乐的bucket_id
    public static final String OSS_CDN = "OSS_CDN";                 // 图片加速用
    public static final String OSS_CDN_MUSIC = "OSS_CDN_MUSIC";     // 音乐文件加速用


    /* 数据库的一些视频config的key */
    public static final String ACCESSKEYID = "ACCESSKEYID";
    public static final String ACCESSKEYSECRET = "ACCESSKEYSECRET";
    public static final String ALIVOD_URL = "ALIVOD_URL";
    public static final String ALIVOD_PLAY_ACTION = "ALIVOD_PLAY_ACTION";

    /* 数据库中访问高德地图api的地址 */
    public static final String AMAP_URL_PLACE_TEXT = "AMAP_URL_PLACE_TEXT";
    public static final String AMAP_URL_PLACE_AROUND = "AMAP_URL_PLACE_AROUND";
    public static final String AMAP_KEY = "AMAP_KEY";

    /* 数据库中redis刷新数据库的时间的key */
    public static final String REFRESH_WRITE_TIME = "REFRESH_WRITE_TIME";
    /* 微信域名 */
    public static final String WX_DOMAIN = "WX_DOMAIN";

    /* redis 存储视频信息 的key */
    public static final String REDIS_MOMENT_HASH_PREFIX = "ltx:moment:count";
    public static final String REDIS_MOMENT_MAP_KEY_MOMENT = "momentId";
    public static final String REDIS_MOMENT_MAP_KEY_LIKE = "likeCount";
    public static final String REDIS_MOMENT_MAP_KEY_VIEW = "viewCount";
    public static final String REDIS_MOMENT_MAP_KEY_SHARE = "shareCount";
    public static final String REDIS_MOMENT_MAP_KEY_COMMENT = "commentCount";
    public static final String REDIS_MOMENT_MAP_KEY_LIKE_NOW = "likeCountNow";
    public static final String REDIS_MOMENT_MAP_KEY_VIEW_NOW = "viewCountNow";
    public static final String REDIS_MOMENT_MAP_KEY_SHARE_NOW = "shareCountNow";
    public static final String REDIS_MOMENT_MAP_KEY_COMMENT_NOW = "commentCountNow";
    public static final String REDIS_MOMENT_MAP_KEY_FLAG = "flag";     // 1:已完成 0:进行中
    public static final String REDIS_MOMENT_MAP_KEY_WRITE_TIME = "writeTime";     // 写入数据库的时间

    /* elasticSearch 的库名称 */
    public static final String ELASTIC_SEARCH_INDEX_NAME_MOMENT = "l_moment_index";     // 动态库
    public static final String ELASTIC_SEARCH_INDEX_NAME_USER = "l_user_index";         // 用户库
    public static final String ELASTIC_SEARCH_INDEX_NAME_TOPIC = "l_topic_index";       // 话题库
    public static final String ELASTIC_SEARCH_INDEX_NAME_SEARCH_LOG = "l_search_log_index";       // 话题库
    public static final String ELASTIC_SEARCH_TYPE_NAME = "doc";    // es索引库的type名, 统一doc, 即将弱化
    /* elasticSearch 搜索字段名称 */
    public static final String ELASTIC_SEARCH_SEARCH_FIELD_MOMENT = "content_text";     // 动态的搜索字段
    public static final String ELASTIC_SEARCH_SEARCH_FIELD_MOMENT_STANDARD = "content_text.standard";     // 动态的搜索字段,标准部分次
    public static final String ELASTIC_SEARCH_SEARCH_FIELD_USER = "nick_name";          // 用户的搜索字段
    public static final String ELASTIC_SEARCH_SEARCH_FIELD_TOPIC = "name";              // 话题的搜索字段

    /* 动态视频文字标题中话题隐藏id的前缀后缀*/
    public static final String MOMENT_CONTENT_TEXT_TOPIC_ID_PREFIX = "<em>";            // 前缀
    public static final String MOMENT_CONTENT_TEXT_TOPIC_ID_SUFFIX = "</em>";           // 后缀

    /* 消息队列的消息的key */
    public static final String MESSAGE_NAME_MOMENT_REFRESH_WRITE = "moment_Refresh_write_message";            // 前缀
    public static final String MESSAGE_NAME_APP_PUSH_MEASSGE= "app_push_message";
    public static final String MESSAGE_NAME_WX_PUSH_MEASSGE= "wx_push_message";
    public static final String MESSAGE_NAME_MOMENT_ADD_PLAY_TIMES= "moment_add_play_times";

    /* 发布动态后延迟30秒发送队列消息, 因为ali那边没有转码上传完成, 没有回调*/
    public static final Integer MESSAGE_DELAY_MS_UPLOAD_VIDEO = 30000;

    /* app推送消息的文字内容 */
    public static final  String PUSH_MESSAGE_APP_CONTENT_FOLLOW = "关注了你";
    public static final  String PUSH_MESSAGE_APP_CONTENT_LIKE = "赞了你的作品";
    public static final  String PUSH_MESSAGE_APP_CONTENT_REMIND = "在视频中提到了你";
    public static final  String PUSH_MESSAGE_APP_CONTENT_COMMENT = "评论了你的作品";

    /* 分页的条数 */
    public static final Integer PAGE_RECOMMEND_ROWS = 10;   // 推荐页


    /* 分享链接的请求mapping path */
    public static final  String SHARE_MAPPING_PATH_VIDEO = "/HELLO";    // 分享视频
}
